import java.util.Scanner;

// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        int n  = in.nextInt();
        long ans = in.nextLong();
        int a = in.nextInt(), b = in.nextInt();
        int a1 = 0, b1 = 0;
        String ret = "";
        while (n-- > 0) {
            String s = in.next();
            char c = s.charAt(0);
            long num = in.nextLong();
            if (c == '?') {
                a1++;
                if (a1 <= a) {
                    if (num == ans) {
                        ret = "yes";
                        break;
                    }
                } else {
                    ret = "no";
                    break;
                }
            } else if (c == '!') {
                b1++;
                if (b1 <= b) {
                    if (num == ans) {
                        ret = "yes";
                        break;
                    }
                } else {
                    ret = "no";
                    break;
                }
            }
        }
        System.out.println(ret);
    }
}